﻿
namespace MockingBird.Studio.UI.UserControls.Model
{
    using System;
    using System.ServiceModel.Description;
    using System.Xml;
    using Thinktecture.Tools.Wscf.Services.ServiceDescription.Contract;

    public class WsdlMessage
    {
        public string MessageName { get; set; }

        public string MessageNamespace { get; set; }

        public XmlQualifiedName MessageQName { get; set; }

        public string Action { get; set; }

        public Type MessageType { get; set; }

        public MessageDescription Message { get; set; }

        public void Load(MessageDescription sourceMsg)
        {
            this.Message = sourceMsg;
            this.MessageName = ServiceDefinition.GetMessageName(sourceMsg);
            this.MessageNamespace = ServiceDefinition.GetMessageNamespace(sourceMsg);
            this.MessageQName = ServiceDefinition.GetMessageQName(sourceMsg);
            this.Action = sourceMsg.Action;



        }

    }
}
